package IO.g4;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class ObjectToUnicode {
	
	public static void main(String[] args) throws IOException {
		FileWriter f = new FileWriter("laith.txt");
		BufferedWriter out = new BufferedWriter(f);
		String name="Laith Raed";
		double gehalt = 3500;
		out.write(name + " " + gehalt);
		out.close();
		
		
		FileReader file = new FileReader(("laith.txt"));
		BufferedReader in = new BufferedReader(file);
		String line = in.readLine();
		String[] value = line.split(" ");
		String vornameAusgabe = value[0];
		double gehaltAusgabe = Double.parseDouble(value[2]);
		in.close();
		
		System.out.println("Vorname: " + vornameAusgabe);
		System.out.println("Gehalt: " + gehaltAusgabe);
	}

}
